const Router = require('koa-router')

const settingController = require('../../controllers/setting.js')

const m = require('../../middlewares/admin_auth')

const router = new Router({prefix: '/admin/api/v1/setting'})


router.get('/getList', settingController.list)


router.post('/create/', m.auth, settingController.create)


router.get('/detail/:id', settingController.detail)


router.post('/delete/:id', m.auth, settingController.delete)


router.get('/getTypeList', settingController.getTypeList)

router.get('/getTypeMap', settingController.getTypeMap)

router.patch('/:id', m.auth, settingController.update)

module.exports = router